//package com.exchange.config;
//
//import org.springframework.amqp.core.*;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.HashMap;
//
///**
// * 定时交换价  tll-exchange
// * @Author : RulerWood
// * @Data : 2024/4/28 - 16:53
// */
//@Configuration
//public class MapTtlMqConfig {
//
//    @Bean("ttl-queue")
//    public Queue queuettl() {
//        //设置了10分钟的队列
//        HashMap<String, Object> map = new HashMap<>(3);
//        map.put("x-dead-letter-exchange",ORDER_DEAD_EXCHANGE);
//        map.put("x-dead-letter-routing-key",ORDER_DEAD_ROUTING);
//        map.put("x-message-ttl",10000);
//        return QueueBuilder.durable("ttl-queue").withArguments(map).build();
//    }
//
//    @Bean("ttl-exchange")
//    public Exchange exchangettl() {
//        return ExchangeBuilder.directExchange("ttl-exchange").build();
//    }
//
//    @Bean
//    public Binding binding1(@Qualifier("ttl-queue") Queue queuettl, @Qualifier("ttl-exchange") Exchange exchangettl) {
//        return BindingBuilder.bind(queuettl).to(exchangettl).with("ttl-queue").noargs();
//    }
//
//}
